package com.blacksheep.mtm.service;

import com.blacksheep.mtm.dto.OrderDto;
import com.blacksheep.mtm.dto.OrderDtoSimple;
import com.blacksheep.mtm.dto.front.OrderUpdateVo;
import com.blacksheep.mtm.pojo.common.DataTablesResult;
import com.blacksheep.mtm.pojo.manager.TbOrder;
import com.github.pagehelper.PageInfo;
import io.swagger.models.auth.In;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;


/**
 * @author
 */
public interface OrderService {

    /**
     * 获得订单列表
     * @param draw
     * @param start
     * @param length
     * @param search
     * @param orderCol
     * @param orderDir
     * @return
     */
    DataTablesResult getOrderList(int draw, int start, int length,int[] state, String search, String minDate, String maxDate, String orderCol, String orderDir);
    /**
     * 获得订单列表
     * @param draw
     * @param start
     * @param length
     * @param search
     * @param orderCol
     * @param orderDir
     * @return
     */
    DataTablesResult getUncomfiredOrderList(int draw, int start, int length,int[] state,int isPrint, String search,  String minDate, String maxDate,String orderCol, String orderDir);


    DataTablesResult getCancelOrderList(int draw, int start, int length, int[] state,int isPrint, String search, String minDate, String maxDate, String orderCol, String orderDir);

    /**
     * 更新订单
     * @param id
     * @return
     */
    int updateOrder(String id,OrderUpdateVo vo);

    /**
     * 定时取消订单
     */
    int cancelOrder(String id,String content);


    TbOrder insertOrder(OrderDto order,Integer wxOrderId);

    int updateOrderCc(String[] id);

    /**
     * 更新调度员,并更改状态
     * @param id
     * @return
     */
    int updateOrderDispatcher(String[] id,Long mid);

    /**
     * 更新发药员,并更改状态
     * @param id
     * @return
     */
    int updateOrderDispenser(String[] id);

    int updateOrderReserveTime(String id,String reserveTime);

    int reviewOrder(String id,int state,String comment);

    void downloadExcel(int[] state ,String minDate, String maxDate, HttpServletResponse response) throws IOException;

    void updateOrderPrintState(String[] ids,int state);
}
